Optimal. Leaf size=43 \[ \frac {d \tanh ^{-1}(\sin (e+f x))}{a f}+\frac {(c-d) \tan (e+f x)}{f (a+a \sec (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {4083, 3855,
3879} \begin {gather*} \frac {(c-d) \tan (e+f x)}{f (a \sec (e+f x)+a)}+\frac {d \tanh ^{-1}(\sin (e+f x))}{a f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3855
Rule 3879
Rule 4083
Rubi steps
\begin {align*} \int \frac {\sec (e+f x) (c+d \sec (e+f x))}{a+a \sec (e+f x)} \, dx &=(c-d) \int \frac {\sec (e+f x)}{a+a \sec (e+f x)} \, dx+\frac {d \int \sec (e+f x) \, dx}{a}\\ &=\frac {d \tanh ^{-1}(\sin (e+f x))}{a f}+\frac {(c-d) \tan (e+f x)}{f (a+a \sec (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(109\) vs. \(2(43)=86\).
time = 0.28, size = 109, normalized size = 2.53 \begin {gather*} \frac {2 \cos \left (\frac {1}{2} (e+f x)\right ) \left (d \cos \left (\frac {1}{2} (e+f x)\right ) \left (-\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )+\log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )\right )+(c-d) \sec \left (\frac {e}{2}\right ) \sin \left (\frac {f x}{2}\right )\right )}{a f (1+\cos (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.17, size = 61, normalized size = 1.42
method | result | size |
derivativedivides | \(\frac {c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )+d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{f a}\) | \(61\) |
default | \(\frac {c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )+d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{f a}\) | \(61\) |
risch | \(\frac {2 i c}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}-\frac {2 i d}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}-\frac {d \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{a f}+\frac {d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{a f}\) | \(91\) |
norman | \(\frac {\frac {\left (c -d \right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}-\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}}{\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )-1}+\frac {d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{a f}-\frac {d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{a f}\) | \(105\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 107 vs.
\(2 (46) = 92\).
time = 0.28, size = 107, normalized size = 2.49 \begin {gather*} \frac {d {\left (\frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} - \frac {\sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} + \frac {c \sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.25, size = 80, normalized size = 1.86 \begin {gather*} \frac {{\left (d \cos \left (f x + e\right ) + d\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left (d \cos \left (f x + e\right ) + d\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (c - d\right )} \sin \left (f x + e\right )}{2 \, {\left (a f \cos \left (f x + e\right ) + a f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {c \sec {\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {d \sec ^{2}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.49, size = 70, normalized size = 1.63 \begin {gather*} \frac {\frac {d \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{a} - \frac {d \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{a} + \frac {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.73, size = 41, normalized size = 0.95 \begin {gather*} \frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (c-d\right )}{a\,f}+\frac {2\,d\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{a\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________